<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Whisper: file_protocol_engine.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Whisper
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">file_protocol_engine.h</div>  </div>
</div>
<div class="contents">
<a href="file__protocol__engine_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef __FILE_PROTOCOL_ENGINE_H__</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define __FILE_PROTOCOL_ENGINE_H__ 1</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;fstream&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00006"></a>00006 
<a name="l00007"></a>00007 <span class="preprocessor">#include &quot;<a class="code" href="types_8h.html">types.h</a>&quot;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &quot;<a class="code" href="stegio_8h.html">stegio.h</a>&quot;</span>
<a name="l00009"></a>00009 <span class="preprocessor">#include &quot;<a class="code" href="properties__reader_8h.html">properties_reader.h</a>&quot;</span>
<a name="l00010"></a>00010 
<a name="l00011"></a><a class="code" href="file__protocol__engine_8h.html#a7cbe2e306329942f7e5151c07b10c8ec">00011</a> <span class="preprocessor">#define LENGTH_FIELD_LENGTH 4</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span>
<a name="l00013"></a>00013 
<a name="l00022"></a><a class="code" href="classCFileProtocolEngine.html">00022</a> <span class="keyword">class </span><a class="code" href="classCFileProtocolEngine.html" title="protocol engine for transmission of file payload.">CFileProtocolEngine</a> : <span class="keyword">public</span> <a class="code" href="classIStegIO.html" title="abstraction layer of a steg payload data source and sink">IStegIO</a>
<a name="l00023"></a>00023 {
<a name="l00024"></a>00024 <span class="keyword">public</span>:
<a name="l00025"></a>00025 
<a name="l00030"></a>00030         <a class="code" href="classCFileProtocolEngine.html#a6d5bc9935babc03560060e0eda0ec110">CFileProtocolEngine</a>(<a class="code" href="properties__reader_8h.html#a67847fd00cb49d80dd45f61722eb9a43">CPropertiesReader</a>* pConfig);
<a name="l00031"></a>00031         <span class="keyword">virtual</span> <a class="code" href="classCFileProtocolEngine.html#a478592c2bf9e3fc7d8a35d4218f121ea">~CFileProtocolEngine</a>();
<a name="l00032"></a>00032 
<a name="l00033"></a>00033         <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classCFileProtocolEngine.html#ae098e7f4488c73119566161a1e9c171c">open</a>();
<a name="l00034"></a>00034         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCFileProtocolEngine.html#a2af5bda1e66b90fbc14516b7498a526e">close</a>();
<a name="l00035"></a>00035         <span class="keyword">virtual</span> <a class="code" href="namespaceNStegIO.html#a7e327c93e6134904ec18fdd7e7a72e80">NStegIO::EReadState</a> <a class="code" href="classCFileProtocolEngine.html#ad43b5004a4c06cf89d6a92380db4531b">read</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>&amp; pByte);
<a name="l00036"></a>00036         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCFileProtocolEngine.html#a189e2d6daa1e86dd345547d5a77e5383">write</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> pByte);
<a name="l00037"></a>00037         <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classCFileProtocolEngine.html#a2662b26f6ed302a240f888616807774d" title="get size of available bytes which can be read with the read methode. For example: If this methode ret...">available</a>();
<a name="l00038"></a>00038 
<a name="l00039"></a><a class="code" href="classCFileProtocolEngine.html#a8d4bbe4d6330d805c2533f0ca8b0e3f3">00039</a>         <span class="keyword">static</span> <span class="keyword">const</span> std::string <a class="code" href="classCFileProtocolEngine.html#a8d4bbe4d6330d805c2533f0ca8b0e3f3">sDefaultReadFilename</a>;
<a name="l00040"></a><a class="code" href="classCFileProtocolEngine.html#a251c3bf83455fde34cafaf2265ed0eab">00040</a>         <span class="keyword">static</span> <span class="keyword">const</span> std::string <a class="code" href="classCFileProtocolEngine.html#a251c3bf83455fde34cafaf2265ed0eab">sDefaultWriteFilename</a>;
<a name="l00041"></a>00041 
<a name="l00042"></a>00042 <span class="keyword">private</span>:
<a name="l00043"></a>00043         <a class="code" href="classCFileProtocolEngine.html#a6d5bc9935babc03560060e0eda0ec110">CFileProtocolEngine</a>();
<a name="l00044"></a>00044         <a class="code" href="classCFileProtocolEngine.html#a6d5bc9935babc03560060e0eda0ec110">CFileProtocolEngine</a>(<span class="keyword">const</span> <a class="code" href="classCFileProtocolEngine.html" title="protocol engine for transmission of file payload.">CFileProtocolEngine</a>&amp; );
<a name="l00045"></a>00045         <a class="code" href="classCFileProtocolEngine.html" title="protocol engine for transmission of file payload.">CFileProtocolEngine</a>&amp; <a class="code" href="classCFileProtocolEngine.html#a714fd426f234d57b102ee214abbb4506">operator=</a>(<span class="keyword">const</span> <a class="code" href="classCFileProtocolEngine.html" title="protocol engine for transmission of file payload.">CFileProtocolEngine</a>&amp; );
<a name="l00046"></a>00046 
<a name="l00047"></a><a class="code" href="classCFileProtocolEngine.html#a6ccd55b9004f43e37354fbba89d4a901">00047</a>         <span class="keyword">static</span> <span class="keyword">const</span> std::string <a class="code" href="classCFileProtocolEngine.html#a6ccd55b9004f43e37354fbba89d4a901">sIniSectionName</a>;
<a name="l00048"></a>00048 
<a name="l00049"></a><a class="code" href="classCFileProtocolEngine.html#a5355a5caa71ef8d9bfed0a2928872b06">00049</a>         <a class="code" href="properties__reader_8h.html#a67847fd00cb49d80dd45f61722eb9a43">CPropertiesReader</a>* <a class="code" href="classCFileProtocolEngine.html#a5355a5caa71ef8d9bfed0a2928872b06">mConfig</a>;
<a name="l00050"></a>00050 
<a name="l00051"></a><a class="code" href="classCFileProtocolEngine.html#a2c52209e75f19713775d54aa21985ee8">00051</a>         std::string <a class="code" href="classCFileProtocolEngine.html#a2c52209e75f19713775d54aa21985ee8">mIOFilenameRead</a>;
<a name="l00052"></a><a class="code" href="classCFileProtocolEngine.html#ae3b5aea08cbbf73e25cb85d08c55fd4d">00052</a>         std::string <a class="code" href="classCFileProtocolEngine.html#ae3b5aea08cbbf73e25cb85d08c55fd4d">mIOFilenameWrite</a>;
<a name="l00053"></a><a class="code" href="classCFileProtocolEngine.html#ab7ffbc5e64718449849597b2194b3bcc">00053</a>         std::ifstream <a class="code" href="classCFileProtocolEngine.html#ab7ffbc5e64718449849597b2194b3bcc">mIOStreamRead</a>;
<a name="l00054"></a><a class="code" href="classCFileProtocolEngine.html#a6dc777cde7cd274e38902bdd56667273">00054</a>         std::ofstream <a class="code" href="classCFileProtocolEngine.html#a6dc777cde7cd274e38902bdd56667273">mIOStreamWrite</a>;
<a name="l00055"></a>00055 
<a name="l00056"></a><a class="code" href="classCFileProtocolEngine.html#a870b019e26bcab52c633869329998ad8">00056</a>         <span class="keywordtype">bool</span> <a class="code" href="classCFileProtocolEngine.html#a870b019e26bcab52c633869329998ad8">mSendEof</a>;
<a name="l00057"></a>00057 
<a name="l00058"></a><a class="code" href="classCFileProtocolEngine.html#a7661ba2ed568f86e255f19c4a4e426aa">00058</a>         int32_t <a class="code" href="classCFileProtocolEngine.html#a7661ba2ed568f86e255f19c4a4e426aa">mBytesToRead</a>; <span class="comment">// read process</span>
<a name="l00059"></a><a class="code" href="classCFileProtocolEngine.html#adc472d732ccca5a49fddceccea45f249">00059</a>         int32_t <a class="code" href="classCFileProtocolEngine.html#adc472d732ccca5a49fddceccea45f249">mBytesToReceive</a>; <span class="comment">// write process</span>
<a name="l00060"></a><a class="code" href="classCFileProtocolEngine.html#aa6afd90699640aa4fe61b03d32cab294">00060</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classCFileProtocolEngine.html#aa6afd90699640aa4fe61b03d32cab294">mAvailableReadBytes</a>; <span class="comment">// for available() methode</span>
<a name="l00061"></a>00061 
<a name="l00062"></a><a class="code" href="classCFileProtocolEngine.html#afe9606d8ee33424e11a27c25da8b620a">00062</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="classCFileProtocolEngine.html#afe9606d8ee33424e11a27c25da8b620a">mByteLengthBufferRead</a>[<a class="code" href="file__protocol__engine_8h.html#a7cbe2e306329942f7e5151c07b10c8ec">LENGTH_FIELD_LENGTH</a>];
<a name="l00063"></a><a class="code" href="classCFileProtocolEngine.html#a92a82232c205735026762c5b69b351e5">00063</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="classCFileProtocolEngine.html#a92a82232c205735026762c5b69b351e5">mByteLengthBufferWrite</a>[<a class="code" href="file__protocol__engine_8h.html#a7cbe2e306329942f7e5151c07b10c8ec">LENGTH_FIELD_LENGTH</a>];
<a name="l00064"></a><a class="code" href="classCFileProtocolEngine.html#a0a3369d34282e35a1359697666c53f59">00064</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="classCFileProtocolEngine.html#a0a3369d34282e35a1359697666c53f59">mLengthCntRead</a>;
<a name="l00065"></a><a class="code" href="classCFileProtocolEngine.html#a34df5e434018f4609f05500baf42bc4c">00065</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="classCFileProtocolEngine.html#a34df5e434018f4609f05500baf42bc4c">mLengthCntWrite</a>;
<a name="l00066"></a>00066 };
<a name="l00067"></a>00067 
<a name="l00068"></a>00068 <span class="preprocessor">#endif // __FILE_PROTOCOL_ENGINE_H__</span>
<a name="l00069"></a>00069 <span class="preprocessor"></span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 25 2012 22:00:39 for Whisper by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
